@extends('d.layout.index')
@section('con')	
<div class="mws-panel-header">
	<span><i class="icon-table"></i> 商品浏览</span>
</div>
<div class="mws-panel-body no-padding">
    <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
    <form action="/admin/goods/index">
	    <div id="DataTables_Table_1_length" class="dataTables_length">
	    	<label>每页显示 
	    		<select size="1" name="num" aria-controls="DataTables_Table_1">
		    		<option value="5" @if($page == 5)selected @endif>5</option>
		    		<option value="10" @if($page == 10)selected @endif>10</option>
		    		<option value="25" @if($page == 25)selected @endif>25</option>
		    		<option value="50" @if($page == 50)selected @endif>50</option>
	    		</select> 条
	    	</label>
	    </div>
	    <div class="dataTables_filter" id="DataTables_Table_1_filter">
	    	<label>搜索: 
	    		<input aria-controls="DataTables_Table_1" name='keywords' type="text" value="{{$keywords}}">
	    	</label>
	    	<input type="submit" value="确定" class="btn">
	    </div>
    </form>
    <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
        <thead>
            <tr role="row">
            	<th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 56px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">ID</th>
            	<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 82px;" aria-label="Browser: activate to sort column ascending">商品图片</th>
            	<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 112px;" aria-label="Browser: activate to sort column ascending">商品名称</th>
            	<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 97px;" aria-label="Platform(s): activate to sort column ascending">商品价格</th>
            	<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 333px;" aria-label="Engine version: activate to sort column ascending">操作</th>
            </tr>
        </thead>
        
   		<tbody role="alert" aria-live="polite" aria-relevant="all">
   			@foreach($list as $k => $v)
   			@if($k % 2 == 0)
   			<tr class="odd">
   			@else
   			<tr class="even">
   			@endif
   				<td class="  sorting_1">{{$v['id']}}</td>
                
                <td class=" "><img src="/goods/pic/{{$v['pic']}}" width="80px" alt=""></td>
                <td class="  sorting_1">{{$v['name']}}</td>
                <td class=" ">{{$v['price']}}</td>
                <td class=" " align='center'>
                	<a href="/admin/goods/editmain/{{$v['id']}}" class="">编辑基本信息</a>
                	&nbsp;&nbsp;&nbsp;
                	<a href="/admin/goods/editdetail/{{$v['id']}}" class="">编辑详细信息</a>
                  &nbsp;&nbsp;&nbsp;
                  <a href="/admin/goods/commentlist/{{$v['id']}}" class="">查看商品评论</a>
                  &nbsp;&nbsp;&nbsp; 
                  <a href="/admin/goods/delete/{{$v['id']}}">删除</a>

                </td>
            </tr>
           @endforeach
        </tbody>
    </table>
   	<div class="dataTables_paginate paging_full_numbers" id="page">

   		<!-- 分页页码 -->
   		{!!$list
   			 -> appends(['num' => $page])
   			 -> appends(['tid' => $tid])
   			 -> appends(['keywords' => $keywords])
   			 -> render()
   		!!}
   	</div>
</div>
</div>
@endsection